#ifndef UTI_ORDERSERIES_H_
#define UTI_ORDERSERIES_H_
#pragma once
#include "sys_config.h"
#include "uti_order.h"
#include "uti_memman.h"


typedef struct OrderSerInfo
{
	unsigned int sersize;
	void (*p)();


}OrderSerInfo;


class OrderSeries
{
public:
	OrderSeries(OrderSerInfo* pOrderserinfo);

	~OrderSeries();

	void Addorder(CThostFtdcOrderField* pOrder);

private:

	//void NewOrder(CThostFtdcOrderField* pOrder);

	//void OldOrder(CThostFtdcOrderField* pOrder);



public:
	OrderData* m_pordercur;//point to last bar of series, this bar may not complete(could be control by value of BarData.isend)

	unsigned int m_orderindex;// if m_pcur is avaliable, its value is >=0. ;
	// used to find other avaliable BarDate before m_pcur, for example used to caculate MA(5)


	OrderSerInfo m_orderserinfo;


private:
	MemMan<OrderData>* m_pmemman; // memory management class of BarSeries. used to store Bar Series data. last bar is m_pobarcur. 



};



#endif